POV-Ray : Newsgroups : povray.advanced-users : Question! : Re: Question! Server Time
30 Jul 2024 04:24:05 EDT (-0400)
  Re: Question!  
From: Chris Huff
Date: 22 Mar 2000 15:32:43
Message: <chrishuff_99-890CEE.15344922032000@news.povray.org>
In article <38d90a6e$1@news.povray.org>, "Simen Kvaal" 
<sim### [at] studentmatnatuiono> wrote:

> Given an object (for example an arbitrary isosurface). Is it any way 
> to calculate, using for example trace, the lower y-coordinate, for 
> example, so that I can place it as close as possible to the ground?

Usually, this will work:
#declare groundHeight = 0; // distance along y-axis of ground
#declare MyObj =
...object declaration...

object {MyObj
    translate y*(groundHeight-min_extent(MyObj).y)
}

However, with some objects(like blobs), it is imprecise. The min_extent 
function returns the lower left front(-x,-y,-z) corner of the bounding 
box of the object, and the bounding box is not always exactly 
calculated(it would be too difficult to calculate for some objects). It 
should work fine for isosurfaces, though.

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Web page: http://chrishuff.dhs.org/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.